home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar Extras 3
/
Ex3side2.d64
/
zip 2.0
(
.txt
)
< prev
Wrap
Commodore BASIC
|
2022-08-28
|
13KB
|
456 lines
999 end
1000 bs=49152:goto1630
1010 b=peek(ad):ad=ad+1:ifb=32then1010
1020 return
1030 aa=ad
1040 b=peek(aa):aa=aa+1:ifb=32then1040
1050 return
1060 gosub1010:ifb<>0thenprintb:goto1730
1070 return
1080 n=0
1090 gosub1010:ifb<48 or b>57 then return
1100 n=n*10+(b-48):goto1090
1110 nh=int(nn/256):nl=nn-(nh*256):return
1120 gosub1110:print mid$(hx$,(nhand240)/16+1,1);mid$(hx$,(nhand15)+1,1);
1130 printmid$(hx$,(nland240)/16+1,1);mid$(hx$,(nland15)+1,1);:return
1140 bx=bx+1:ifp<>3 then ml=ml+1:return
1150 poke ml,z:ml=ml+1:return
1160 ifp<>1thensp=sp+1:sl=sl+1:return
1170 pokesp,z:sp=sp+1:sl=sl+1:return
1180 ifp<>3thenreturn
1190 dx=dx+1:poke dw,nl:poke dw+1,nh:dw=dw+2:return
1200 gosub1010:ifb>64then1220
1210 g=1:ad=ad-1:gosub1080:ad=ad-1:nn=n:goto1240
1220 gosub1250
1230 g=0:b=b-65:nn=(b*2)+679
1240 b=peek(ad):gosub1110:return
1250 if(b<65 or b>90)then5360
1260 return
1270 z=173:gosub1140:z=nl:gosub1140:z=nh:goto1140
1280 z=173:gosub1140:z=nl+1:gosub1140:z=nh:goto1140
1290 z=141:gosub1140:z=nl:gosub1140:z=nh:goto1140
1300 z=141:gosub1140:z=nl+1:gosub1140:z=nh:goto1140
1310 z=169:gosub1140:z=nl:goto1140
1320 z=169:gosub1140:z=nh:goto1140
1330 z=173:gosub1140:z=vl:gosub1140:z=vh:goto1140
1340 z=173:gosub1140:z=vl+1:gosub1140:z=vh:goto1140
1350 z=141:gosub1140:z=vl:gosub1140:z=vh:goto1140
1360 z=141:gosub1140:z=vl+1:gosub1140:z=vh:goto1140
1370 nl=ms(h,0):nh=ms(h,1):return
1380 gosub1140:z=nl:gosub1140:z=nh:goto1140
1390 gosub1140:z=nl+1:gosub1140:z=nh:goto1140
1400 gosub1140:z=nl:goto1140
1410 gosub1140:z=nh:goto1140
1420 z=165:gosub1140:z=y:goto1140
1430 z=162:gosub1140:z=y:goto1140
1440 z=161:gosub1140:z=y:goto1140
1450 z=145:gosub1140:z=y:goto1140
1460 z=160:gosub1140:z=y:goto1140
1470 z=133:gosub1140:z=y:goto1140
1480 z=56:goto1140
1490 z=24:goto1140
1500 z=32:gosub1140:z=yl:gosub1140:z=yh:goto1140
1510 z=76:gosub1140:z=yl:gosub1140:z=yh:goto1140
1520 z=233:gosub1140:z=nl:goto1140
1530 z=233:gosub1140:z=nh:goto1140
1540 z=105:gosub1140:z=nl:goto1140
1550 z=105:gosub1140:z=nh:goto1140
1560 z=237:gosub1140:z=nl:gosub1140:z=nh:goto1140
1570 z=237:gosub1140:z=nl+1:gosub1140:z=nh:goto1140
1580 z=109:gosub1140:z=nl:gosub1140:z=nh:goto1140
1590 z=109:gosub1140:z=nl+1:gosub1140:z=nh:goto1140
1600 z=y1:gosub1140:z=y2:goto1140
1610 z=y1:gosub1140:z=y2:gosub1140:z=y3:goto1140
1620 z=169:gosub1140:z=y:goto1140
1630 lx=3:xx=0:zp=bs+80:p=1:zm=zp:sk=-1
1640 dim ll(200,1),fs(6,4),li%(lx,5),ms(5,3),oc%(3,1)
1650 gosub5440:sys828,232,3
1660 fori=0tolx:forj=0to5:readli%(i,j):next:next:bx=0:dx=0:f2=0
1670 ad=peek(43)+peek(44)*256:print"[147] ***** pass";p;" *****"
1680 sp=zp:ml=zm
1690 nm=peek(ad)+peek(ad+1)*256
1700 ln=peek(ad+2)+peek(ad+3)*256:ifln>999then1740
1710 print" compiling line #"mid$(str$(ln),2)
1720 ifp=2thenll(xx,0)=ln:ll(xx,1)=ml:xx=xx+1
1730 ad=ad+4:gosub1010:goto1790
1740 ifp=1thenp=2:zm=sp:r1=zm:la=sp:u1=bx:bx=0:goto1670
1750 ifp=2thenp=3:zm=la:r2=zm:gosub5420:db=la+bx+4:dw=db:u2=bx:bx=0:goto1670
1760 u3=bx:gosub4760:print"done!":print:gosub4580
1770 ifpeek(ml-1)<>96thenz=96:gosub1140
1780 end
1790 ifb=136then3610:rem let
1800 ifb=153then2020:rem print
1810 ifb=128then2300:rem end
1820 ifb=137then2170:rem goto
1830 ifb=141then2230:rem gosub
1840 ifb=142then2300:rem return
1850 ifb=139then2320:rem if
1860 ifb=151then2600:rem poke
1870 ifb=129then2710:rem for
1880 ifb=130then2960:rem next
1890 ifb=135then3320:rem read
1900 ifb=140then3420:rem restore
1910 ifb=131then3470:rem data
1920 ifb=156then3510:rem clr
1930 ifb=143then2000:rem rem
1940 ifb=161then3530:rem get
1950 ifb=158then4300:rem sys
1960 rem this line assumes let
1970 ad=ad-1:goto3610
1980 sysbs:end
1990 fori=0toxx-1:printll(i,0),ll(i,1):next
2000 ad=nm:goto1690
2010 rem handle print
2020 gosub1010:ifb=199then3250
2030 ifb>64 then2110
2040 ifb<>34then2150
2050 sl=0:nn=sp:gosub1110
2060 b=peek(ad):ad=ad+1:if((b=0)or(b=34))then2080
2070 z=b:gosub1160:goto2060
2080 gosub1310:y=34:gosub1470:gosub1320:y=35:gosub1470
2090 y=sl:gosub1430:yl=37:yh=171:gosub1500:gosub1010:ifb<>59then2150
2095 goto2000
2100 rem handle print <var>
2110 ifb<65 or b>91 then5360
2120 b=b-65:nn=(b*2)+679:gosub1110:gosub1010:w=b
2130 gosub1280:z=174:gosub1380:yl=205:yh=189:gosub1500:ifw<>59then2150
2135 goto2000
2140 rem handle print <cr>
2150 yl=215:yh=170:gosub1500:goto2000
2160 rem handle goto <line number>
2170 gosub1080:if p<>3 then2210
2180 ifxx=0then5380
2190 f2=0:fori=0to(xx-1):ifll(i,0)=nthenf2=1:nn=ll(i,1)
2200 next:iff2=0then5380
2210 gosub1110:yl=nl:yh=nh:gosub1510:goto2000
2220 rem handle gosub <line number>
2230 gosub1080:if p<>3 then2210
2240 ifxx=0then5380
2250 f2=0:fori=0to(xx-1):ifll(i,0)=nthenf2=1:nn=ll(i,1)
2260 next:iff2=0then5380
2270 gosub1110:z=32:gosub1140:z=nl:gosub1140:z=nh:gosub1140:goto2000
2280 gosub1110:yl=nl:yh=nh:gosub1500:goto2000
2290 rem handle return
2300 z=96:gosub1140:goto2000
2310 rem handle if
2320 gosub1010:ifb<65 or b>90 then5360
2330 b=b-65:nn=(b*2)+679:gosub1110:vh=nh:vl=nl
2340 gosub1010
2350 ifb=177thenf1=1:goto2390:rem >
2360 ifb=178thenf1=2:goto2390:rem =
2370 ifb=179thenf1=3:goto2390:rem <
2380 goto5360:rem syntax error
2390 f3=0:gosub1010:ifb<65then2420
2400 gosub1250:f3=1:b=b-65:nn=(b*2)+679:gosub1110:goto2430
2410 rem if <var> <=> <num or var>
2420 ad=ad-1:gosub1080:ad=ad-1:nn=n:gosub1110
2430 gosub1480:gosub1330:iff3thengosub1560:goto2450
2440 gosub1520
2450 y=2:gosub1470:gosub1340:iff3thengosub1570:goto2470
2460 gosub1530
2470 y1=5:y2=2:gosub1600
2480 iff1<>3then2500
2490 y1=240:y2=5:gosub1600:y1=176:y2=3:gosub1600:goto2530
2500 iff1<>2then2520
2510 y1=208:y2=3:gosub1600:goto2530
2520 y1=144:y2=5:gosub1600:y1=240:y2=3:gosub1600:goto2530
2530 gosub1010:ifb<>167then5360
2540 gosub1080:if p<>3 then2580
2550 ifxx=0then5380
2560 f2=0:fori=0to(xx-1):ifll(i,0)=nthenf2=1:nn=ll(i,1)
2570 next:iff2=0then5380
2580 gosub1110:yl=nl:yh=nh:gosub1510:goto2000
2590 rem handle poke
2600 gosub1200:vl=nl:vh=nh:tt=g:gosub1010:ifb<>44then5360
2610 gosub1200:ifttthen2660
2620 gosub1330:y=20:gosub1470:gosub1340:y=21:gosub1470
2630 ifgthengosub1310:goto2650
2640 gosub1270
2650 y=0:gosub1430:y1=129:y2=20:gosub1600:goto2000
2660 ifg=0thengosub1270:goto2680
2670 gosub1310
2680 ifvh=0theny=vl:gosub1470:goto2000
2690 gosub1350:goto2000
2700 rem handle for
2710 gosub1010:ifb<65 or b>90 then5360
2720 b=b-65:nn=(b*2)+679:gosub1110:vh=nh:vl=nl
2730 sk=sk+1:fs(sk,3)=nn:fs(sk,4)=0:fs(sk,1)=1
2740 gosub1010:ifb<>178then5360
2750 gosub1010:if b>64then2800
2760 rem start = constant
2770 ad=ad-1:gosub1080:nn=n:gosub1110:gosub1310:gosub1350:gosub1320:gosub1360
2780 ad=ad-1:goto2810
2790 rem start = variable
2800 b=b-65:nn=(b*2)+679:gosub1110:gosub1270:gosub1350:gosub1280:gosub1360
2810 gosub1010:ifb<>164then5360
2820 gosub1010:if b>64then2860
2830 rem to = constant
2840 ad=ad-1:gosub1080:ad=ad-1:fs(sk,0)=n:goto2870
2850 rem to = variable
2860 b=b-65:nn=(b*2)+679:fs(sk,0)=nn:fs(sk,4)=fs(sk,4) or 2
2870 fs(sk,2)=ml:gosub1010:ifb=0then2000
2880 rem handle step
2890 ifb<>169then5360
2900 gosub1010:if b>64then2940
2910 rem step = constant
2920 ad=ad-1:gosub1080:ad=ad-1:fs(sk,1)=n:goto2000
2930 rem step = variable
2940 b=b-65:nn=(b*2)+679:fs(sk,1)=nn:fs(sk,4)=fs(sk,4) or 4 : goto2000
2950 rem handle next
2960 ifsk=-1then5390
2970 nn=fs(sk,3):gosub1110:vl=nl:vh=nh
2980 nn=fs(sk,1):gosub1110
2990 gosub1490:gosub1330
3000 if(fs(sk,4)and4)=4 then3020
3010 gosub1540:goto3030
3020 gosub1580
3030 gosub1350
3040 gosub1340
3050 if(fs(sk,4)and4)=4 then3070
3060 gosub1550:goto3080
3070 gosub1590
3080 gosub1360
3090 nn=fs(sk,2):gosub1110:al=nl:ah=nh
3100 nn=fs(sk,0):gosub1110
3110 gosub1480:gosub1330
3120 if(fs(sk,4)and2)=2 then3140
3130 gosub1520:goto3150
3140 gosub1560
3150 y=2:gosub1470
3160 gosub1340
3170 if(fs(sk,4)and2)=2 then3190
3180 gosub1530:goto3200
3190 gosub1570
3200 y1=5:y2=2:gosub1600
3210 y1=240:y2=2:gosub1600:y1=176:y2=3:gosub1600
3220 yl=al:yh=ah:gosub1510
3230 sk=sk-1:goto2000
3240 rem handle print chr$()
3250 gosub1010:ifb<>40then5360
3260 gosub1010:ifb>64then3280
3270 ad=ad-1:gosub1080:y=(n and 255):gosub1620:goto3300
3280 b=b-65:nn=(b*2)+679:gosub1110
3290 gosub1270
3300 yl=210:yh=255:gosub1500:gosub1010:ifb<>59then2150
3305 goto2000
3310 rem handle read
3320 ifp<>2 then337